# Misc.
CONFIG_BLK_DEV_INITRD=y
CONFIG_DYNAMIC_DEBUG=y
CONFIG_MODULE_SRCVERSION_ALL=y
# CONFIG_STRICT_DEVMEM is not set

# Filesystems.
CONFIG_DEBUG_FS=y
CONFIG_OVERLAY_FS=y
CONFIG_SQUASHFS=y

# GDB debugging.
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_KERNEL=y
CONFIG_GDB_SCRIPTS=y

# KGDB
CONFIG_CONSOLE_POLL=y
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
CONFIG_KDB_DEFAULT_ENABLE=0x1
CONFIG_KDB_KEYBOARD=y
CONFIG_KGDB=y
CONFIG_KGDB_KDB=y
CONFIG_KGDB_LOW_LEVEL_TRAP=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_KGDB_TESTS=y
# CONFIG_KGDB_TESTS_ON_BOOT is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
# CONFIG_SERIAL_KGDB_NMI is not set

# Non-static variables show up on /proc/kallsyms
# https://stackoverflow.com/questions/20196636/does-kallsyms-have-all-the-symbol-of-kernel-functions/44614878#44614878
CONFIG_KALLSYMS_ALL=y

# /proc/config.gz
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y

# TODO make example.
# This seems to allow userspace to create arbitrary configuration trees,
# which kernel modules can then read and interpret.
CONFIG_CONFIGFS_FS=y

# Module.symvers in kernel tree and modules tree contains CRC of signatures.
# TODO: I think the CRC are stored in the built kernel and module, and checked
# at insmod, but bgrep did not find it in kernel image.
# Does not show in /proc/kallyms either.
CONFIG_MODVERSIONS=y

# ftrace
CONFIG_DYNAMIC_FTRACE=y
CONFIG_FTRACE=y
CONFIG_FTRACE_SYSCALLS=y
CONFIG_FUNCTION_GRAPH_TRACER=y
CONFIG_FUNCTION_PROFILER=y
CONFIG_FUNCTION_TRACER=y
CONFIG_HWLAT_TRACER=y
CONFIG_IRQSOFF_TRACER=y
CONFIG_SCHED_TRACER=y
CONFIG_STACK_TRACER=y
CONFIG_TRACER_SNAPSHOT=y

# Process tracing.
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y

# 9P
CONFIG_9P_FS=y
CONFIG_9P_FS_POSIX_ACL=y
CONFIG_9P_FS_SECURITY=y
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NET_9P=y
CONFIG_NET_9P_DEBUG=y
CONFIG_NET_9P_VIRTIO=y
# 9P needed for ARM. Not fully minimized, but so be it.
CONFIG_PCI=y
CONFIG_PCI_HOST_COMMON=y
CONFIG_PCI_HOST_GENERIC=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BLK=y

# Misc
CONFIG_DUMMY_IRQ=m
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# Requirement for LOGO.
CONFIG_FB=y
CONFIG_LOGO=y

## Networking

# If given, we can use QEMU 2.9.0 default x86 networking without any -net or -netdev options,
# since E1000 is the default networking device as mentioned at:
# https://en.wikibooks.org/w/index.php?title=QEMU/Networking&oldid=3268753
#CONFIG_E1000=y

## x86

# https://stackoverflow.com/questions/20069620/print-kernels-page-table-entries
# cat /sys/kernel/debug/kernel_page_tables
CONFIG_X86_PTDUMP=y

## UIO

# All other UIO depend on this module.
CONFIG_UIO=m

# Generic platform devices.
# https://yurovsky.github.io/2014/10/10/linux-uio-gpio-interrupt/
CONFIG_UIO_DMEM_GENIRQ=m
CONFIG_UIO_PDRV_GENIRQ=m

# https://github.com/rumpkernel/wiki/wiki/Howto:-Accessing-PCI-devices-from-userspace
# /sys/class/uio/
# /sys/class/uio/uio0
CONFIG_UIO_PCI_GENERIC=m

## ARM

CONFIG_ARM64_PTDUMP=y

# For record and replay.
CONFIG_8139CP=y
